3.1099 \(\int \frac{(A+B x) \left (a+b x+c x^2\right )^p}{x} \, dx\)

Optimal. Leaf size=273 \[ \frac{A 2^{2 p-1} \left (\frac{-\sqrt{b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (\frac{\sqrt{b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (a+b x+c x^2\right )^p F_1\left (-2 p;-p,-p;1-2 p;-\frac{b-\sqrt{b^2-4 a c}}{2 c x},-\frac{b+\sqrt{b^2-4 a c}}{2 c x}\right )}{p}-\frac{B 2^{p+1} \left (-\frac{-\sqrt{b^2-4 a c}+b+2 c x}{\sqrt{b^2-4 a c}}\right )^{-p-1} \left (a+b x+c x^2\right )^{p+1} \, _2F_1\left (-p,p+1;p+2;\frac{b+2 c x+\sqrt{b^2-4 a c}}{2 \sqrt{b^2-4 a c}}\right )}{(p+1) \sqrt{b^2-4 a c}} \]

[Out]

(2^(-1 + 2*p)*A*(a + b*x + c*x^2)^p*AppellF1[-2*p, -p, -p, 1 - 2*p, -(b - Sqrt[b
^2 - 4*a*c])/(2*c*x), -(b + Sqrt[b^2 - 4*a*c])/(2*c*x)])/(p*((b - Sqrt[b^2 - 4*a
*c] + 2*c*x)/(c*x))^p*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(c*x))^p) - (2^(1 + p)*B*
(-((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c]))^(-1 - p)*(a + b*x + c*x^2
)^(1 + p)*Hypergeometric2F1[-p, 1 + p, 2 + p, (b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(2
*Sqrt[b^2 - 4*a*c])])/(Sqrt[b^2 - 4*a*c]*(1 + p))

_______________________________________________________________________________________

Rubi [A]  time = 0.36883, antiderivative size = 273, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19 \[ \frac{A 2^{2 p-1} \left (\frac{-\sqrt{b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (\frac{\sqrt{b^2-4 a c}+b+2 c x}{c x}\right )^{-p} \left (a+b x+c x^2\right )^p F_1\left (-2 p;-p,-p;1-2 p;-\frac{b-\sqrt{b^2-4 a c}}{2 c x},-\frac{b+\sqrt{b^2-4 a c}}{2 c x}\right )}{p}-\frac{B 2^{p+1} \left (-\frac{-\sqrt{b^2-4 a c}+b+2 c x}{\sqrt{b^2-4 a c}}\right )^{-p-1} \left (a+b x+c x^2\right )^{p+1} \, _2F_1\left (-p,p+1;p+2;\frac{b+2 c x+\sqrt{b^2-4 a c}}{2 \sqrt{b^2-4 a c}}\right )}{(p+1) \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]  Int[((A + B*x)*(a + b*x + c*x^2)^p)/x,x]

[Out]

(2^(-1 + 2*p)*A*(a + b*x + c*x^2)^p*AppellF1[-2*p, -p, -p, 1 - 2*p, -(b - Sqrt[b
^2 - 4*a*c])/(2*c*x), -(b + Sqrt[b^2 - 4*a*c])/(2*c*x)])/(p*((b - Sqrt[b^2 - 4*a
*c] + 2*c*x)/(c*x))^p*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(c*x))^p) - (2^(1 + p)*B*
(-((b - Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c]))^(-1 - p)*(a + b*x + c*x^2
)^(1 + p)*Hypergeometric2F1[-p, 1 + p, 2 + p, (b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(2
*Sqrt[b^2 - 4*a*c])])/(Sqrt[b^2 - 4*a*c]*(1 + p))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 35.4641, size = 224, normalized size = 0.82 \[ \frac{A \left (\frac{b + 2 c x - \sqrt{- 4 a c + b^{2}}}{2 c x}\right )^{- p} \left (\frac{b + 2 c x + \sqrt{- 4 a c + b^{2}}}{2 c x}\right )^{- p} \left (a + b x + c x^{2}\right )^{p} \operatorname{appellf_{1}}{\left (- 2 p,- p,- p,- 2 p + 1,- \frac{b - \sqrt{- 4 a c + b^{2}}}{2 c x},- \frac{b + \sqrt{- 4 a c + b^{2}}}{2 c x} \right )}}{2 p} - \frac{B \left (\frac{- \frac{b}{2} - c x + \frac{\sqrt{- 4 a c + b^{2}}}{2}}{\sqrt{- 4 a c + b^{2}}}\right )^{- p - 1} \left (a + b x + c x^{2}\right )^{p + 1}{{}_{2}F_{1}\left (\begin{matrix} - p, p + 1 \\ p + 2 \end{matrix}\middle |{\frac{\frac{b}{2} + c x + \frac{\sqrt{- 4 a c + b^{2}}}{2}}{\sqrt{- 4 a c + b^{2}}}} \right )}}{\left (p + 1\right ) \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)*(c*x**2+b*x+a)**p/x,x)

[Out]

A*((b + 2*c*x - sqrt(-4*a*c + b**2))/(2*c*x))**(-p)*((b + 2*c*x + sqrt(-4*a*c +
b**2))/(2*c*x))**(-p)*(a + b*x + c*x**2)**p*appellf1(-2*p, -p, -p, -2*p + 1, -(b
 - sqrt(-4*a*c + b**2))/(2*c*x), -(b + sqrt(-4*a*c + b**2))/(2*c*x))/(2*p) - B*(
(-b/2 - c*x + sqrt(-4*a*c + b**2)/2)/sqrt(-4*a*c + b**2))**(-p - 1)*(a + b*x + c
*x**2)**(p + 1)*hyper((-p, p + 1), (p + 2,), (b/2 + c*x + sqrt(-4*a*c + b**2)/2)
/sqrt(-4*a*c + b**2))/((p + 1)*sqrt(-4*a*c + b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 3.73845, size = 487, normalized size = 1.78 \[ \frac{1}{4} \left (-\sqrt{b^2-4 a c}+b+2 c x\right ) (a+x (b+c x))^p \left (\frac{A (2 p-1) x \left (\sqrt{b^2-4 a c}+b+2 c x\right ) F_1\left (-2 p;-p,-p;1-2 p;-\frac{b+\sqrt{b^2-4 a c}}{2 c x},\frac{\sqrt{b^2-4 a c}-b}{2 c x}\right )}{p (a+x (b+c x)) \left (p \left (-\left (\sqrt{b^2-4 a c}+b\right )\right ) F_1\left (1-2 p;1-p,-p;2-2 p;-\frac{b+\sqrt{b^2-4 a c}}{2 c x},\frac{\sqrt{b^2-4 a c}-b}{2 c x}\right )+p \left (\sqrt{b^2-4 a c}-b\right ) F_1\left (1-2 p;-p,1-p;2-2 p;-\frac{b+\sqrt{b^2-4 a c}}{2 c x},\frac{\sqrt{b^2-4 a c}-b}{2 c x}\right )+2 c (2 p-1) x F_1\left (-2 p;-p,-p;1-2 p;-\frac{b+\sqrt{b^2-4 a c}}{2 c x},\frac{\sqrt{b^2-4 a c}-b}{2 c x}\right )\right )}+\frac{B 2^{p+1} \left (\frac{\sqrt{b^2-4 a c}+b+2 c x}{\sqrt{b^2-4 a c}}\right )^{-p} \, _2F_1\left (-p,p+1;p+2;-\frac{b}{2 \sqrt{b^2-4 a c}}-\frac{c x}{\sqrt{b^2-4 a c}}+\frac{1}{2}\right )}{c p+c}\right ) \]

Warning: Unable to verify antiderivative.

[In]  Integrate[((A + B*x)*(a + b*x + c*x^2)^p)/x,x]

[Out]

((b - Sqrt[b^2 - 4*a*c] + 2*c*x)*(a + x*(b + c*x))^p*((A*(-1 + 2*p)*x*(b + Sqrt[
b^2 - 4*a*c] + 2*c*x)*AppellF1[-2*p, -p, -p, 1 - 2*p, -(b + Sqrt[b^2 - 4*a*c])/(
2*c*x), (-b + Sqrt[b^2 - 4*a*c])/(2*c*x)])/(p*(a + x*(b + c*x))*(-((b + Sqrt[b^2
 - 4*a*c])*p*AppellF1[1 - 2*p, 1 - p, -p, 2 - 2*p, -(b + Sqrt[b^2 - 4*a*c])/(2*c
*x), (-b + Sqrt[b^2 - 4*a*c])/(2*c*x)]) + (-b + Sqrt[b^2 - 4*a*c])*p*AppellF1[1
- 2*p, -p, 1 - p, 2 - 2*p, -(b + Sqrt[b^2 - 4*a*c])/(2*c*x), (-b + Sqrt[b^2 - 4*
a*c])/(2*c*x)] + 2*c*(-1 + 2*p)*x*AppellF1[-2*p, -p, -p, 1 - 2*p, -(b + Sqrt[b^2
 - 4*a*c])/(2*c*x), (-b + Sqrt[b^2 - 4*a*c])/(2*c*x)])) + (2^(1 + p)*B*Hypergeom
etric2F1[-p, 1 + p, 2 + p, 1/2 - b/(2*Sqrt[b^2 - 4*a*c]) - (c*x)/Sqrt[b^2 - 4*a*
c]])/((c + c*p)*((b + Sqrt[b^2 - 4*a*c] + 2*c*x)/Sqrt[b^2 - 4*a*c])^p)))/4

_______________________________________________________________________________________

Maple [F]  time = 0.117, size = 0, normalized size = 0. \[ \int{\frac{ \left ( Bx+A \right ) \left ( c{x}^{2}+bx+a \right ) ^{p}}{x}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)*(c*x^2+b*x+a)^p/x,x)

[Out]

int((B*x+A)*(c*x^2+b*x+a)^p/x,x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (B x + A\right )}{\left (c x^{2} + b x + a\right )}^{p}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*(c*x^2 + b*x + a)^p/x,x, algorithm="maxima")

[Out]

integrate((B*x + A)*(c*x^2 + b*x + a)^p/x, x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{{\left (B x + A\right )}{\left (c x^{2} + b x + a\right )}^{p}}{x}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*(c*x^2 + b*x + a)^p/x,x, algorithm="fricas")

[Out]

integral((B*x + A)*(c*x^2 + b*x + a)^p/x, x)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)*(c*x**2+b*x+a)**p/x,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (B x + A\right )}{\left (c x^{2} + b x + a\right )}^{p}}{x}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x + A)*(c*x^2 + b*x + a)^p/x,x, algorithm="giac")

[Out]

integrate((B*x + A)*(c*x^2 + b*x + a)^p/x, x)